import { createApp } from 'vue'
import App from './App.vue'
import {
  Layout,
  Row,
  Col,
  Menu,
  Tabs,
  Button, Card, List,
  Descriptions, Tree,
  Table, message, Modal,
  Form, Popconfirm,
  BackTop,
  Spin,
  ConfigProvider,
  Input,
  Select,
  Upload,
  Avatar,
  Radio,
  Tag,
  Dropdown,
  Tooltip
} from 'ant-design-vue'
import 'ant-design-vue/dist/antd.css'
import router from './router'
import store from './store'
import axios from './axios'
if (process.env.NODE_ENV === 'development') {
  require('./mock')
}
const app = createApp(App)
const antdComps = [
  Tooltip, Dropdown, Tag, Radio, Avatar, Upload, Select, Input, Layout, Row, Col, Menu, Tabs, Button, Card, List, Descriptions, Tree, Table, Modal, Form, Popconfirm, BackTop, Spin, ConfigProvider
]
antdComps.forEach(comp => {
  app.use(comp)
})
app.config.globalProperties.$message = message
app.config.globalProperties.$axios = axios
// if (process.env.NODE_ENV === 'development') {
//   if ('__VUE_DEVTOOLS_GLOBAL_HOOK__' in window) {
//     // 这里__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue赋值一个createApp实例
//     window.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue = app
//   }
//   app.config.devtools = true
// }
app.use(store).use(router).mount('#app')
